﻿<!-- #include virtual="/form/include/conn.asp" -->
<!-- #include virtual="/form/include/function.asp" -->
<%
id=Request("fid")
if id="" or not isnumeric(id) then url_return "参数错误!"
sql="select k,name from "&tbl&"diyfrm where id="&id
Set rs=conn.execute(sql)
if rs.eof then  url_return "找不到指定的智能表单!"
if rs(0)<>1 then url_return "暂时不能填写指定的表单数据!"
frmname=rs(1)
rs.Close
Set rs=nothing
'------------------------------------------------------------------------------------------
sql="select * from "&tbl&"diyfrm_q where fid="&id&" order by id asc"
Set rs=Server.CreateObject("adodb.recordset")
rs.Open sql,conn,1,1
if rs.eof then url_return "该表单没有数据!"
ti=0
%>
<table id="frm" width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<%
do while not rs.eof
	ti=ti+1
	v="a_"&rs("id")
%>	
	<tr><td width="100" height="20" bgcolor="#FFFFFF"><%=rs("q")%></td>
	<td height="20" bgcolor="#FFFFFF" class="frmvi">
<%
	select case cstr(rs("t"))
		case 1:Response.Write(get1())
		case 3:Response.Write(get3())
		case 4:Response.Write(get4())
		case 5:Response.Write(get5())
		case else url_return "表单存在关键错误!"
	end select
%>
</td></tr>
<%
	rs.MoveNext
loop
%>
	<tr><td height="20" colspan="2" align="center" valign="middle" bgcolor="#FFFFFF">
    <input name="fid" type="hidden" value="<%=id%>" />
    <div align="center"><input type="button" name="pSubmit" value=" 提 交 " /></div>
	</td></tr></table>